package com.code.zjm;

import android.view.View;
import android.widget.Button;

public class SecondActivity extends BaseActivity {
    private final static String TAG = SecondActivity.class.getSimpleName();
    private Button turnToMain, turnToThird, turnToForth;

    @Override
    protected void initView() {
        super.initView();
        turnToMain = (Button) findViewById(R.id.turn_to_first);
        turnToThird = (Button) findViewById(R.id.turn_to_third);
        turnToForth = (Button) findViewById(R.id.turn_to_forth);
    }

    @Override
    protected void initListener() {
        super.initListener();
        turnToMain.setOnClickListener(this);
        turnToThird.setOnClickListener(this);
        turnToForth.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.turn_to_first:
                intent.setClass(SecondActivity.this, MainActivity.class);
                break;
            case R.id.turn_to_third:
                intent.setClass(SecondActivity.this, ThirdActivity.class);
                break;
            case R.id.turn_to_forth:
                intent.setClass(SecondActivity.this, ForthActivity.class);
                break;
        }
        startActivity(intent);
    }

    @Override
    protected String getTAG() {
        return TAG;
    }

    @Override
    protected Object getContentView() {
        return R.layout.activity_second;
    }
}
